package java6681.salary;

public class Employee6681 {
  private static long start=1000;
  private String name;
  private long id;
  private double salary;//基本工资
  private double increase;//增加的工资
  public Employee6681() {
    //新员工自动编号
    id=++start;
  }
  public Employee6681(String name, double salary) {
    this();
    this.name = name;
    this.salary = salary;
  }
  public String getName() {
    return name;
  }
  public void setName(String name) {
    this.name = name;
  }
  public long getId() {
    return id;
  }

  public double getSalary() {
    return salary;
  }
  public void setSalary(double salary) {
    this.salary = salary;
  }
  public double getIncrease() {
    return increase;
  }
  public void setIncrease(double increase) {
    this.increase = increase;
  }
  
  public String toString() {
    //员工的基本信息
    return  "id="+id+",姓名="+name+",基本工资="+salary+",增加工资="+increase;
  }
  public void raise(double percent) {
    //按比例调整工资
    increase=salary*percent;
  }
}
